<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>   
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"  %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Insert title here</title>
<link rel="stylesheet" href="/resources/common/adminCommon.css">
<script>
	function go_update(no,pos)
	{
		state=form1.state[pos].value;
		location.href="/admin/orderEdit?no="+no+"&state="+state;
	}
</script>
</head>
<body bgcolor="white" text="black" link="blue" vlink="purple" alink="red" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<center>

<br>
<jsp:include page="../main_header.jsp" flush="true"/>

<form name="form1" method="post" action="jumun.html">
<input type="hidden" name="page" value="0">

<table width="800" border="0" cellspacing="0" cellpadding="0">
	<tr height="40">
		
		<td align="right" width="650" valign="bottom">

	<tr><td height="5"></td></tr>
</table>

<table width="800" border="1" cellspacing="0" cellpadding="0" bordercolordark="white" bordercolorlight="black">
	<tr bgcolor="#CCCCCC" height="23"> 
		<td width="70"  align="center">주문번호</td>
    <td width="70"  align="center">주문일</td>
	  <td width="250" align="center">상품명</td>
		<td width="40"  align="center">제품수</td>	
		<td width="70"  align="center">총금액</td>
    <td width="65"  align="center">주문자</td>
		<td width="50"  align="center">결재</td>
    <td width="135" align="center">주문상태</td>
    <td width="50"  align="center">삭제</td>
	</tr>
	
		 <c:forEach items="${jumunInfo}" var="jumunList" varStatus="cnt">
		 <tr bgcolor="#F2F2F2" height="23"> 
			<td width="70"  align="center"><a href="/admin/orderDetail?order_no=${jumunList.order_no}">${jumunList.order_no}</a></td>
			<td width="100"  align="center">${jumunList.orderdate}</td>
			<td width="250" align="left">&nbsp;${jumunList.NAME}</td>	
			<td width="40" align="center">${jumunList.quantity}</td>	
			<td width="70"  align="right">${jumunList.PRICE * jumunList.quantity}&nbsp</td>	
			<td width="65"  align="center">${jumunList.name}</td>	
			<td width="50"  align="center"><c:if test="${jumunList.pay_method==0}">카드</c:if>
										   <c:if test="${jumunList.pay_method==1}">입금</c:if></td>
			<td width="135" align="center" valign="bottom">
				<select name="state" style="font-size:9pt; color:black">
					<c:if test="${jumunList.status=='주문신청'}"><option value="1" selected>주문신청</option>
															  <option value="2"a>주문완료</option>
															  <option value="3">주문취소</option></c:if>
					<c:if test="${jumunList.status=='주문완료'}"><option value="1">주문신청</option>
															  <option value="2" selected>주문완료</option>
															  <option value="3">주문취소</option></c:if>
					<c:if test="${jumunList.status=='주문취소'}"><option value="1">주문신청</option>
															  <option value="2">주문완료</option>
															  <option value="3" selected>주문취소</option></c:if>
				</select>&nbsp;
				<a href="javascript:go_update('${jumunList.order_no}',${cnt.index });"><img src="/resources/image/b_edit1.gif" border="0"></a>
			</td>	
			<td width="50" align="center" valign="bottom">
				<a href="/admin/orderDelete?no=${jumunList.order_no}" onclick="javascript:return confirm('삭제할까요 ?');"><img src="/resources/image/b_delete1.gif" border="0"></a>
			</td>
		</tr>
		</c:forEach> 


</table>

<br>
<table width="800" border="0" cellpadding="0" cellspacing="0">
	<tr>
		<td height="30" class="cmfont" align="center">
			<img src="/resources/image/i_prev.gif" align="absmiddle" border="0"> 
			<font color="#FC0504"><b>1</b></font>&nbsp;
			<a href="jumun.html?page=2&sel1=&sel2=&text1=&day1_y=&day1_m=&day1_d=&day2_y=&day2_m=&day2_d="><font color="#7C7A77">[2]</font></a>&nbsp;
			<a href="jumun.html?page=3&sel1=&sel2=&text1=&day1_y=&day1_m=&day1_d=&day2_y=&day2_m=&day2_d="><font color="#7C7A77">[3]</font></a>&nbsp;
			<img src="/resources/image/i_next.gif" align="absmiddle" border="0">
		</td>
	</tr>
</table>

</form>

</center>
</body>
</html>